<template>
  <view class="cm-loading" v-if="loadingState !== 'success'"
    :style="[cmStyle]"
    :class="[loadingClass, cmClass]"
    @click.stop.prevent="clickHandler"
    @touchmove.stop.prevent="moveHandler">
    <!-- 上面绑定的.stop.prevent都是防止事件穿透 -->
    
    <view class="cm-loading-wrapper">
      <view>
        <cm-icon :type="iconType"></cm-icon>
      </view>
      <view class="cm-margin-top-5 cm-text-14">{{ txtType }}</view>
    </view>
      
  </view>
</template>

<script src="./cm-loading.js"></script>

<style lang="stylus">
@import './cm-loading.styl'
</style>
